<template>
  <div style="width: 100vw; height: 100vh">
    <AMap @mapLoaded="mapLoaded"> </AMap>
  </div>
</template>

<script setup lang="ts">
import AMap, { type MapEmitType } from "map";

const mapLoaded: MapEmitType["mapLoaded"] = ({ map, AMap }) => {
  const Marker = new AMap.Marker({
    position: new AMap.LngLat(116.397477, 39.908692),
  });

  map.add(Marker);

  map.setCenter(new AMap.LngLat(116.397477, 39.908692));
};
</script>

<style></style>
